triplet convolutional neural network
Metric Learning Using Siamese and Triplet Convolutional Neural Networks
Siamese network, as the name implies, needs a pair of input sample images to get a pair of latent vectors. As shown in Figure 1, two sample images Xa and Xb are fed into base networks one after the other to get latent vectors G(Xa) and G(Xb). Here, only one base network exists and its weights are shared for the two input sample images. Then in the latent embedding space, the distance D between the two latent vectors are calculated. Finally, the calculated distance D is substituted into the loss function (Figure 1) and the base network is tuned via back propagation for better latent vector embedding.